package org.apache.flink.runtime.rest.messages.job.metrics;

import org.apache.flink.runtime.rest.handler.job.metrics.ConsumerMetricsHandler;
import org.apache.flink.runtime.rest.messages.ConsumerIDPathParameter;
import org.apache.flink.runtime.rest.messages.MessageHeaders;

/** {@link MessageHeaders} for {@link ConsumerMetricsHandler}. */
public final class JobMetricsHeaders extends AbstractMetricsHeaders<JobMetricsMessageParameters> {

    private static final JobMetricsHeaders INSTANCE = new JobMetricsHeaders();

    private JobMetricsHeaders() {}

    @Override
    public JobMetricsMessageParameters getUnresolvedMessageParameters() {
        return new JobMetricsMessageParameters();
    }

    @Override
    public String getTargetRestEndpointURL() {
        return "/jobs/:" + ConsumerIDPathParameter.KEY + "/metrics";
    }

    public static JobMetricsHeaders getInstance() {
        return INSTANCE;
    }

    @Override
    public String getDescription() {
        return "Provides access to job metrics.";
    }
}
